import { Injectable } from '@nestjs/common';
import { JwtService } from '@nestjs/jwt';

@Injectable()
export class AuthService {
  constructor(private readonly jwtService: JwtService) {}

  login({ username, id, role }: { username: string; id: string; role: string }) {
    return { token: this.jwtService.sign({ username, id, role }) };
  }
}
